package net.entelijan.cobean.examples.showcase.table;

import javax.swing.JButton;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;

import net.entelijan.cobean.examples.util.ExamplesUtil;
import net.entelijan.scf.DefaultShowcasePanel;
import net.miginfocom.swing.MigLayout;

public class FilterFocusTablePanel extends DefaultShowcasePanel {

	private static final long serialVersionUID = 1L;

	private JTable table = new JTable();

	private JTextField filterTextField = new JTextField();

	private JButton showSelectionButton = new JButton("Show Selection");

	private JButton deleteSelectionButton = new JButton("Delete Selection");

	public FilterFocusTablePanel() {
		super();
		this.table.setName("FilterFocusTablePanel.table");
		this.filterTextField.setName("FilterFocusTablePanel.filterTextField");
		setLayout(new MigLayout());
		add(this.filterTextField, "w max, grow, wrap");
		add(new JScrollPane(this.table), "w max, h max, wrap");
		add(ExamplesUtil.createButtonsPanel(100, this.showSelectionButton,
				deleteSelectionButton));
	}

	public JTable getTable() {
		return table;
	}

	public void setTable(JTable table) {
		this.table = table;
	}

	public JButton getShowSelectionButton() {
		return showSelectionButton;
	}

	public void setShowSelectionButton(JButton showSelectionButton) {
		this.showSelectionButton = showSelectionButton;
	}

	public JButton getDeleteSelectionButton() {
		return deleteSelectionButton;
	}

	public void setDeleteSelectionButton(JButton deleteSelectionButton) {
		this.deleteSelectionButton = deleteSelectionButton;
	}

	public JTextField getFilterTextField() {
		return filterTextField;
	}

	public void setFilterTextField(JTextField filterTextField) {
		this.filterTextField = filterTextField;
	}

}
